<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>超级管理员页面</title>
    <link rel="stylesheet" href="/admin/css/admin.css">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <script type="text/javascript" src="/static/js/jquery-3.6.0.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
<%--    导航--%>
<div class="header-nav">
    <div class="header-nav-middle">
        <a href="/user/index.jsp" class="header-nav-item">LoveLife!</a>
        <a href="javascript:void(0)" class="header-nav-item">实物周边</a>
        <a href="javascript:void(0)" class="header-nav-item">活动中心</a>
        <a href="/user/PersonalCenter.jsp" class="header-nav-item">个人中心</a>
        <a href="/user/category.jsp" class="header-nav-item" style="margin-left: 425px">欢迎来到超级管理员页面</a>
        <c:if test="${loginUser!=null}">
            <a href="/commons/login.jsp" class="header-nav-item">
                <c:out value="${loginUser.account},你好！">
                </c:out>
            </a>
        </c:if>
        <c:if test="${loginUser==null}">
            <a href="/commons/login.jsp" class="header-nav-item">登录</a>
        </c:if>
<%--        <a href="/commons/register.jsp" class="header-nav-item">立即注册</a>--%>
    </div>
</div>
<div class="header-nav-bottom"></div>
<%--    内容--%>
<div class="content container-fluid">
    <!--左侧侧边栏-->
    <div class="side-left col-md-3" style="margin-left: -15px;">
        <div>
            <span><i class="fa fa-address-book-o" aria-hidden="true"></i></span>
            <div class="list_one addColor addPage" id="src5" path="frontPage">首页</div>
        </div>
        <div>
            <span> <i class="fa fa-balance-scale" aria-hidden="true"></i></span>
            <div class="list_one" id="one">用户管理</div>
            <div id="jiantou1"></div>
            <div class="list_two">
                <div class="addColor addPage" id="src1" path="managerManage">管理员管理</div>
                <div class="addColor addPage" id="src2" path="userManage">用户管理</div>
            </div>
        </div>
        <div>
            <span><i class="fa fa-telegram" aria-hidden="true"></i></span>
            <div class="list_one" id="two">商品管理</div>
            <div id="jiantou2"></div>
            <div class="list_two">
                <div class="addColor addPage" id="src3" path="categoryManage">商品品类管理</div>
                <div class="addColor addPage" id="src4" path="goodsManage">商品管理</div>
            </div>
        </div>
        <div>
            <span> <i class="fa fa-user-circle-o" aria-hidden="true"></i></span>
            <div class="list_one addPage" class="two" path="orderManage">订单管理</div>
        </div>
        <div>
            <span> <i class="fa fa-user-circle-o" aria-hidden="true"></i></span>
            <div class="list_one addPage" class="two" path="cartManage">购物车管理</div>
        </div>
        <div>
            <span> <i class="fa fa-user-circle-o" aria-hidden="true"></i></span>
            <div class="list_one" class="two addPage" path="other">设置</div>
        </div>
        <div>
            <span> <i class="fa fa-user-circle-o" aria-hidden="true"></i></span>
            <div class="list_one addPage" class="two" path="other">服务</div>
        </div>
        <div>
            <span> <i class="fa fa-user-circle-o" aria-hidden="true"></i></span>
            <div class="list_one addPage" class="two" path="other">当前模块还在升级中</div>
        </div>
    </div>
    <!--右侧内容-->
    <div class="frame-div col-md-9">
        <iframe class="iframe" src="./frontPage.jsp" frameborder="0" class="ifm"  scrolling="auto" style="background-color: white;width:1100px;height: 65%;">
        </iframe>
    </div>
</div>
<script>
    $(function () {
        //设置高亮
        $(".addColor").on('click',function () {
            $(".addColor").css("backgroundColor","#282B33");
            $(this).css("backgroundColor","#009688");
        });
        //设置滑动
        $(".list_one").click(function(){
            $(this).siblings(".list_two").slideToggle("1s");
            $(this).parent().siblings().children(".list_two").slideUp("1s");
        });
        $(".addPage").each(function () {
            $(this).click(function () {
                let path = $(this).attr("path");
                $(".iframe").prop("src",path+".jsp");
            })
        })
    })
</script>
</body>
</html>